<% layout('/layouts/default.html', {title: '室温地图', libs: ['dataGrid']}){ %>
<div class="main-content" style="height: 100%;">
<!--	<img src="${ctxStatic}/ditu.png"/>-->
<!--	<table id="dataGrid"></table>-->
	<style type="text/css">
		.map_box{
			float: left;
			width: 96%;
			margin-left: 2%;
			position: relative;
		}
	</style>
	<div class="content">
		<div class="content_head">
			地址栏：<a href="/ditu/">中国</a>&nbsp;   &#62;  &nbsp;
			<a href="/map_city/%E5%90%89%E6%9E%97%E7%9C%81">吉林省</a>&nbsp;   &#62;  &nbsp;
			长春市&nbsp;
		</div>
		<div class="map_box">
			<div id="allmap"></div>
		</div>
	</div>

</div>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=zVwp68KloikGDC1zwhLiAI4Kuu2fmuvv"></script>
<script type="text/javascript">
	// 百度地图API功能
	var map = new BMap.Map("allmap");
	var point = new BMap.Point(126.656539,45.764741);
	//1
	//var myIcon = new BMap.Icon("${ctxStatic}/swjk37.png", new BMap.Size(30,40));
	//创建自定义图标

	var pt1 = new BMap.Point(125.84252000,44.14321700);

	var myIcon = new BMap.Icon("${ctxStatic}/swjk37.png", new BMap.Size(30,40));

	var marker1 = new BMap.Marker(pt1,{icon:myIcon});  // 创建标注
	map.addOverlay(marker1);              // 将标注添加到地图中


	map.centerAndZoom(pt1, 11);
	var opts = {
		width : 100,     // 信息窗口宽度
		height: 30,     // 信息窗口高度
	}

	var infoWindow1 = new BMap.InfoWindow("地址：福星<br/>温度：29.4°C", opts);  // 创建信息窗口对象
	marker1.addEventListener("mouseover", function(){
		map.openInfoWindow(infoWindow1,pt1); //开启信息窗口
	});
	marker1.addEventListener("mouseout", function(){
		map.closeInfoWindow(infoWindow1,pt1);//关闭信息窗口
	});
	marker1.addEventListener("click", function(){
		
		window.location.href = "${ctx}/ab/abFloorTree/build";
	});

	map.enableScrollWheelZoom(true);//地图缩放功能
	//单击获取点击的经纬度
	// map.addEventListener("click",function(e){
	//     alert(e.point.lng + "," + e.point.lat);
	// });
</script>
<footer class="main-footer m0">
	<div class="pull-right hidden-xs">当前版本： ${@Global.getConfig('productVersion')}</div>
	&copy; ${@DateUtils.getYear()} ${@Global.getConfig('productName')} - Powered By dreamcode
</footer>
<% } %>